<?php

/**
* @current cmsmessagesmanage.php
* @author   LiuYang <liu_yang@haibao.com>
* @date 2017年2月9日 上午10:46:39
*/
namespace haibao\jiepai\model\data\messages;

class CmsMessagesManage extends \haibao\jiepai\model\data\Base{
    /**
     * 1，站内通知  2，模板消息 3，欢迎辞
     */
    const CATEGORY_MESSAGE = 1;
    const CATEGORY_TEMPLATE = 2;
    const CATEGORY_WELCOME = 3;
    
    /**
     * 1,业务活动 2,管理员通知
     */
    const TYPE_BUSINESS = 1;
    const TYPE_MESSAGE = 2;
    
    /**
     * 范围类型 1，设备  2，单用户
     */
    const RangeType_device = 1;
    const RangeType_single = 2;
    
    /**
     * 0,全部 1,苹果 2，安卓 
     */
    const RANGEDEVICE_ALL = 0;
    const RANGEDEVICE_APPLE = 1;
    const RANGEDEVICE_ANDROID = 2;
    
    /**
     * 0 全部用户  1 仅注册用户
     */
    const ISONLYUSER_ALL = 0;
    const ISONLYUSER_REGISTER = 1;
    
    /**
     * 打开页面 0,不打开 1,文章 2,专题 3,人物 4,标签 5,网页
     */
    const OPENTYPE_ERROR = 0;
    const OPENTYPE_ARTICLE = 1;
    const OPENTYPE_FEATURE = 2;
    const OPENTYPE_HOME = 3;
    const OPENTYPE_TAG = 4;
    const OPENTYPE_NETPAGE = 5;
    
    /**
     * 0正常 -1关闭
     */
    const FLAG_CLOSE = -1;
    const FLAG_ENABLE = 0;
    
    public $Category;
    
    public $Type;
    /**
     * 标题
     */
    public $Title;
    
    /**
     * 摘要
     */
    public $Summary;
    
    public $OpenType;
    
    public $ContentID = NULL;
    
    /**
     * 文章类型
     */
    public $ContentType = NULL;
    
    /**
     * 网页链接
     */
    public $Url;
    
    public $RangeType;
    
    public $RangeDevice;
    
    public $IsOnlyUser;
    
    /**
     * 指定用户ID
     */
    public $ToUserID;
    
    /**
     * 首页置顶标题
     */
    public $HomeTopTitle;
    
    /**
     * 发布时间
     */
    public $PublishTime;
    
    public $Flag = 0;
    
    /**
     * 管理员ID
     */
    public $AdminID;
    
    public $CreateTime;
    
    public function __construct(){
        parent::__construct();

        $this->setColumnName('Id', 'ID');
        
        $this->intField('Category', 'Category',true);
        $this->intField('Type', 'Type');
        
        $this->stringField('Title', 'Title',true);
        $this->stringField('Summary', 'Summary',true);
        
        $this->intField('OpenType', 'OpenType',true);
        $this->intField('ContentID', 'ContentID');
        $this->intField('ContentType', 'ContentType');
        
        $this->stringField('Url', 'Url');
        
        $this->intField('RangeType', 'RangeType',true);
        $this->intField('RangeDevice', 'RangeDevice');
        $this->intField('IsOnlyUser', 'IsOnlyUser');
        $this->intField('ToUserID', 'ToUserID');
        
        $this->stringField('HomeTopTitle', 'HomeTopTitle');
        
        $this->dateField('PublishTime', 'PublishTime',true);
        
        $this->intField('Flag', 'Flag',true);
        $this->intField('AdminID', 'AdminID');
        
        $this->dateField('CreateTime', 'CreateTime',true);
        
        
        $this->setTableName('cms_messages_manage');
    }
}
